﻿//-----------------------------------------------------------------------
// <copyright file="Member.cs" company="tuliprules.org">
//     Copyright (c) 2011 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Member class.</summary>
//-----------------------------------------------------------------------
namespace Tulip.Rules.Models.Rif.Prd
{
    using System;
    using System.ComponentModel;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a member formula.
    /// </summary>
    [Serializable]
    [DesignerCategory(@"code")]
    [XmlType(AnonymousType = true, Namespace = "http://www.w3.org/2007/rif#")]
    [XmlRoot(Namespace = "http://www.w3.org/2007/rif#", IsNullable = false)]
    public class Member : Irimeta, IRifPrdElement
    {
        /// <summary>
        /// The instance field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private Instance instanceField;

        /// <summary>
        /// The class field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private Class classField;

        /// <summary>
        /// Gets or sets a member instance role.
        /// </summary>
        [XmlElement("instance", Order = 0)]
        public Instance Instance
        {
            get
            {
                return this.instanceField;
            }

            set
            {
                this.instanceField = value;
            }
        }

        /// <summary>
        /// Gets or sets a member class role.
        /// </summary>
        [XmlElement("class", Order = 1)]
        public Class Class
        {
            get
            {
                return this.classField;
            }

            set
            {
                this.classField = value;
            }
        }
    }
}
